import { Component } from '@angular/core';
import { UserService } from "./user/user.service";
import { Observable } from 'rxjs/Observable';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
})
export class AppComponent {
  judge:boolean = true; 
  transparent = '';
  isBig:boolean;
  testing = {
  };
  none={};
  testClass={};
  constructor(public userService:UserService) {
    this.testing = {
      'border':'0',
      'background-color':'transparent'
    };
    this.isBig = window.screen.width > 800?true:false;
  }
  changeClass(){
    this.judge = !this.judge;
  }
  ngOnInit() {
    
    window.addEventListener('scroll',()=>{
      if(window.scrollY>50){
        this.judge = false;
        this.testing = {};
      }else{
        this.judge = true;
        this.testing = {
          'border':'0',
          'background-color':'transparent'
        };
      }
    })
   }
   test(e){
     console.log(e);
   }
   toAdd(){
     
   }
}
